package com.adprof.demo.natives.viewholders;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.recyclerview.widget.RecyclerView;

import com.adprof.demo.android.R;

/**
 * 产品内容ViewHolder - 用于展示产品内容
 * 同时支持RecyclerView和ListView
 */
public class ProductViewHolder extends RecyclerView.ViewHolder {
    public ImageView productImage;
    public TextView productTitle, productDesc, priceText, ratingText;
    public TextView salesText, cartBtn;

    public ProductViewHolder(View itemView) {
        super(itemView);
        productImage = itemView.findViewById(R.id.product_image);
        productTitle = itemView.findViewById(R.id.product_title);
        productDesc = itemView.findViewById(R.id.product_desc);
        priceText = itemView.findViewById(R.id.price_text);
        ratingText = itemView.findViewById(R.id.rating_text);
        salesText = itemView.findViewById(R.id.sales_text);
        cartBtn = itemView.findViewById(R.id.cart_btn);
    }
}
